package com.rpclearnging.codec.impl;

import com.alibaba.fastjson.JSON;
import com.rpclearnging.codec.Decoder;

/**
 * @author:zyh
 * @Time:2021-03-17-16:34
 * @email:1269231889@qq.com
 * 反序列化
 */
public class JsonDecoder implements Decoder {
    @Override
    public <T> T decoder(byte[] bytes,Class<T> clazz) {
        return JSON.parseObject(bytes,clazz);
    }
}
